{
  "properties" : { },
  "id" : "copy1728373023763d53536",
  "script" : null,
  "groupId" : "e6cd7933a0e746b8b4af97af80c9c45c",
  "name" : "字段",
  "createTime" : 1728702394515,
  "updateTime" : 1728441965937,
  "lock" : null,
  "createBy" : null,
  "updateBy" : null,
  "path" : "/column",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\r\n    \"tn\":\"tb_res_staff\"\r\n}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"msg\": \"\",\n    \"data\": [],\n    \"status\": 1\n}",
  "description" : null,
  "requestBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : null,
    "defaultValue" : null,
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "tn",
      "value" : "tb_res_staff",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : null,
    "defaultValue" : null,
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "msg",
      "value" : "",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "data",
      "value" : "",
      "description" : "",
      "required" : false,
      "dataType" : "Array",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "status",
      "value" : "1",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  }
}
================================
import log

var tn = body.tn
var cinfo = db.select("""
    SELECT DATA_TYPE dtype,CHARACTER_MAXIMUM_LENGTH mlength,COLUMN_NAME cname,
        COLUMN_COMMENT ccomment,IS_NULLABLE isnull
    FROM information_schema.COLUMNS
    WHERE TABLE_SCHEMA = database() AND TABLE_NAME = #{tn}
     order by ORDINAL_POSITION ;
""")
exit 0, "",cinfo;
